﻿@using EquipmentAlarmSystem.Service.Models.Enum
@model Configure

@{
    ViewData["Title"] = "系统设置";
}

<partial name="_SystemConfiguration" />

<form id="myForm" action="/SystemConfiguration/SystemSettings" method="post">

    <!-- 文本输入框 -->
    <label for="SamplingInterval">采样间隔:</label>
    <input type="text" id="SamplingInterval" name="SamplingInterval" value="@Model.SamplingInterval" required>
    <br>
    <br>
    <label for="PushInterval">推送间隔:</label>
    <input type="text" id="PushInterval" name="PushInterval" value="@Model.PushInterval" required>
    <br>
    <br>
    <!-- 复选框 -->
    <label for="EnablePush">启用推送：</label>
    <input type="checkbox" id="EnablePush" name="EnablePush" value="true" @if (Model.EnablePush)
    {
        <text>checked="checked"</text>
    }>
    @* <input type="checkbox" id="EnablePush" name="EnablePush" value="@Model.EnablePush" checked> *@
    <br>
    <br>
    <label for="Autograph">短信签名:</label>
    <input type="text" id="Autograph" name="Autograph" value="@Model.Autograph" required>
    <br>
    <br>
    <label for="Heartbeat">网络心跳:</label>
    <input type="text" id="Heartbeat" name="Heartbeat" value="@Model.Heartbeat" required>
    <br>
    <br>
    <!-- 下拉列表 -->
    <label for="ServiceType">服务类型:</label>
    <select asp-for="@Model.ServiceType" asp-items="Html.GetEnumSelectList<ServerType>()" name="ServiceType"></select>
    <br>
    <br>
    <label for="ServiceAddress">服务地址:</label>
    <input type="text" id="ServiceAddress" name="ServiceAddress" value="@Model.ServiceAddress" required>
    <br>
    <br>
    <label for="EnableAlarmPush">报警启用时间限制：</label>
    <input type="checkbox" id="EnableAlarmPush" name="EnableAlarmPush" value="true" @if (Model.EnableAlarmPush)
    {
        <text>checked="checked"</text>
    }>
    <br>
    <br>
    <label for="EnableAlarmPushTime">启用报警推送时间:</label>
    <input type="text" id="EnableAlarmPushTime" name="EnableAlarmPushTime" value="@Model.EnableAlarmPushTime" required>
    <br>
    <br>
    <label for="DisableAlarmPushTime">禁用报警推送时间:</label>
    <input type="text" id="DisableAlarmPushTime" name="DisableAlarmPushTime" value="@Model.DisableAlarmPushTime" required>
    <br>
    <br>

    <!-- 提交按钮 -->
    <input type="submit" value="提交">
</form>

